
// StudetnModel
const mongoose = require("mongoose")

const Student = new require("mongoose").Schema({
    studentNo:{
        type:String,
        required:true,
        index:true,
        select:true,
        trim:true
    }, 
    studentName:{
        type:String,
        required:true,
        index:true,
        select:true,
        trim:true
    },
    studentPhone:{
        type:String,
        required:true,
        select:true,
        trim:true
    },
    studentEmail:{
        type:String,
        required:true,
        select:true,
        trim:true
    },
    studentSex:{
        type:Number,
        default:1,
        select:true
    },
    studentBirthday:{
        type:Number,
        required:true,
        select:true
    },
    studentInSchoolDate:{
        type:Number,
        required:true,
        select:true,
    },
    studentAvatar:{
        type:String,
        default:"http://q4.qlogo.cn/headimg_dl?dst_uin=2857734156&spec=100",
        select:true
    },
    studentDepartment:{
        type:String,
        required:true,
        select:true
    },
    studentNowAddress:{
        type:String,
        default:"暂无地址",
        select:true
    },
    studentHomeAddress:{
        type:String,
        default:"暂无地址",
        select:true
    },
    studentParentName:{
        type:String,
        default:"未填写",
        select:true
    },
    studentParentPhone:{
        type:String,
        default:"未填写",
        select:true,
        trim:true
    },
    studentParentJob:{
        type:String,
        default:"未填写",
        select:true,
        trim:true
    },
    studentSkill:{
        type:Array,
        default:"暂无爱好",
        select:true
    },
    studentTotalScore:{
        type:Number,
        default:0,
        select:true
    },
    studentRecommend:{
        type:String,
        default:"未填写",
        select:true
    },
    studentSubjectsIds:{
        type:String,
        select:true
    },
    lastLoginDate:{
        type:Number,
        select:true
    },
    dollar:{
        type:Number,
        default:1000,
        select:true
    },
    isDelete:{
        type:Number,
        default:0
    },
    permission:{
        type:Number,
        default:1,
        select:true
    },
    role:{
        type:String,
        default:"student",
        select:true
    },
    studentGradeId:{
        type:Number,
        select:true
    },
    loginStatus:{
        type:Number,
        default:0,
        select:true,
    }

});

module.exports =  mongoose.model("student",Student)